﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Project.DBMAPPING;
using Project.IDAO;

namespace Project.DAO
{
    public class ProductDetailDAO:IProductDetailDAO
    {
        
            /// <summary>
            /// Load product list of a specific category
            /// </summary>
            /// <param name="categoryID">Input category ID</param>
            /// <returns>List of products</returns>
            public List<SP_PRODUCT_LOADPRODUCTDETAILResult> LoadProductDetail(int productID)
            {
                // Declare variable to access database
                DbMappingDataContext database = new DbMappingDataContext();
                // Return a list of products
                return database.SP_PRODUCT_LOADPRODUCTDETAIL(productID).ToList();
            }
        
    }
}
